package com.claims;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;

/**
 * Created by 峥桂 on 2017/6/7.
 */
public class ClaimsStatusCAS {
    private String curVal = "";

    private static AtomicReference atomicReferencesync = new AtomicReference("1_1");

    public boolean updateStateLongSnc(int id, int varl) {
        String currKey = id + "#" + varl;
//        System.out.print("===>>"+AtomicReference);
        return atomicReferencesync.compareAndSet("1_1", currKey);

    }
}